package com.cskaoyan.catmall.controller.wx;

import com.cskaoyan.catmall.model.bo.BaseParamBo;
import com.cskaoyan.catmall.model.vo.BaseRespVo;
import com.cskaoyan.catmall.model.vo.BrandDetailWxVO;
import com.cskaoyan.catmall.model.vo.BrandListWxVo;
import com.cskaoyan.catmall.service.BrandServiceWx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date: 2022-01-09-21-11
 * @author: ZYY
 * @description: 前台的后端中品牌的控制层
 */
@RestController
@RequestMapping("wx")
public class BrandControllerWx {

    @Autowired
    BrandServiceWx brandService;

    /**
     * @author:zyy
     * @description: 品牌的显示
     * @date:2022/01/10 14:35
     * @param params
     * @return com.cskaoyan.catmall.model.vo.BaseRespVo
     */
    @RequestMapping("brand/list")
    public BaseRespVo brandList(@Validated BaseParamBo params){
        BrandListWxVo data =  brandService.brandList(params);
        return BaseRespVo.ok(data);
    }

    @RequestMapping("brand/detail")
    public BaseRespVo brandDetail(Integer id){
        BrandDetailWxVO data = brandService.brandDetail(id);
        return BaseRespVo.ok(data);
    }


}